package pl.lodz.p.browarex.service;

import javax.inject.Named;

import org.springframework.beans.factory.annotation.Autowired;

import pl.lodz.p.browarex.base.BaseCrudService;
import pl.lodz.p.browarex.dao.CustomerDAO;
import pl.lodz.p.browarex.model.Customer;
import pl.lodz.p.browarex.services.interfaces.ICustomerService;

@Named
public class CustomerService extends
		BaseCrudService<CustomerDAO, Customer, Long> implements
		ICustomerService {

	@Autowired
	public CustomerService(CustomerDAO dao) {
		super(dao);
	}

	public boolean login(String login, String password) {
		// TODO Auto-generated method stub
		return true;
	}

	@Override
	public Customer getByUsername(String username) {
		return ((CustomerDAO) dao).getByUsername(username);
	}

	@Override
	public Customer loadByCustomerID(String customerID) {
		return ((CustomerDAO) dao).getByCustomerID(customerID);
	}

}
